<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">

    <title>运营列表</title>
    <link href="/static/admin/css/public/style.css" rel="stylesheet">
    <link href="/static/admin/css/public/style-responsive.css" rel="stylesheet">
    <link href="/static/admin/css/public/plugs/bootstrap-datetimepicker.min.css" rel="stylesheet">
    <link href="/static/admin/css/public/loading.css" rel="stylesheet">
    <link href="/static/admin/css/sys/roomSet.css" rel="stylesheet">

</head>

<body class="sticky-header" style="font-family: '微软雅黑';">

<div class="page-heading">
    <ul class="breadcrumb" style="margin-top: 20px;">
        <span style="font-weight: bold;">位置：</span>
        <li>系统管理</li>
        <li class="active"> 运营列表 </li>
    </ul>
</div>
<hr />
<!-- 页面位置 -->
<div class="wrapper" >
    <div class="row row-margin">
        <div class="col-sm-12">
            <div style="padding: 0 0 10px 10px; font-size: 18px; color: #17A05D;">
                <span class="fa fa-plus" style="cursor: pointer;" title="添加管理员" data-toggle="modal" data-target="#addAdmin"></span>
            </div>
            <section class="panel panel-margin">
                <div class="panel-body" style="margin-top: -90px">
                    <table class="table table-hover table-bordered table-condensed general-table">
                        <thead>
                        <tr>
                            <th>id</th>
                            <th>昵称</th>
                            <th>登录账号</th>
                            <th>账号状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody id="databody">
                        {empty name="businessList"}
                             <tr>
                                 <td colspan="5" align="center">数据正在加载中，请稍后~</td>
                             </tr>
                        {else/}
                             {volist name="businessList" id="list"}
                                <tr>
                                    <td>{$list.ID}</td>
                                    <td>{$list.NickName}</td>
                                    <td>{$list.Accounts}</td>
                                    <td>
                                        {switch name="list.State"}
                                            {case value="0"}正常{/case}
                                            {case value="1"}禁用{/case}
                                        {/switch}
                                    </td>
                                    <td>
                                        {switch name="list.State"}
                                            {case value="0"}
                                                <button class='btn btn-danger btn-sm'onclick='lockorUnlock({$list.ID},1)'>禁用</button>&nbsp;&nbsp;<button class='btn btn-warning btn-sm'data-name='{$list.Accounts}'onclick='changPsd({$list.ID},this)'>修改密码</button>
                                            {/case}
                                            {case value="1"}
                                                <button class='btn btn-success btn-sm'onclick='lockorUnlock({$list.ID},2)'>解除禁用</button>&nbsp;&nbsp;<button class='btn btn-warning btn-sm'data-name='{$list.Accounts}'onclick='changPsd({$list.ID},this)'>修改密码</button>
                                            {/case}
                                        {/switch}

                                    </td>

                                </tr>

                             {/volist}
                        {/empty}

                        </tbody>
                    </table>
                </div>
            </section>
        </div>
    </div>
</div>


<!--添加运营-->
<div class="modal fade" id="addAdmin" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4>添加运营</h4>
            </div>
            <div class="modal-body">
                <form class="form-inline">
                    <table id="modal_table">
                        <tr>
                            <td align="right" class="mtTitle">昵称：</td>
                            <td>
                                <input type='text' id="nickName" class="form-control" placeholder="请输入昵称"  />
                            </td>
                            <td><span class="fa" id="nError"></span></td>
                        </tr>
                        <tr>
                            <td align="right" class="mtTitle">账号：</td>
                            <td>
                                <input type='text' id="account" class="form-control" placeholder="请输入登录账号"  />
                            </td>
                            <td><span class="fa" id="aError"></span></td>
                        </tr>
                        <tr>
                            <td align="right" class="mtTitle">密码：</td>
                            <td>
                                <input type='text' id="password"  class="form-control" placeholder="请输入密码"  />
                            </td>
                            <td><span class="fa" id="psdError"></span></td>
                    </table>
                    <input type="hidden" id="roletype" value="1">
                    <input id="resetGGForm" type="reset" style="display: none;" />
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-success" onclick="subAdd()">确定</button>
                <button type="button" class="btn btn-danger" onclick="cancelAdd()">取消</button>
            </div>
        </div>
    </div>
</div>
<!--修改密码-->
<div class="modal fade" id="changePssword" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4>修改密码</h4>
            </div>
            <div class="modal-body">
                <form class="form-inline">
                    <table id="modal_password_table">
                        <tr>
                            <td align="right" class="mtTitle">账号：</td>
                            <td>
                                <input type='text' id="accounts" class="form-control" readonly value=""  />
                            </td>
                            <td></td>
                        </tr>
                        <tr>
                            <td align="right" class="mtTitle">新密码：</td>
                            <td>
                                <input type='text' id="newpassword"  class="form-control" placeholder="请输入新密码"  />
                            </td>
                            <td><span class="fa" id="newpsdError"></span></td>
                    </table>
                    <input type="hidden" id="userid" value="">
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-success" onclick="subChange()">确定</button>
                <button type="button" class="btn btn-danger" onclick="cancelChange()">取消</button>
            </div>
        </div>
    </div>
</div>
<!--
提示框
-->
<div class="modal fade" id="tishi" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4>提示</h4>
            </div>
            <div class="modal-body">
                操作成功！
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" onclick="window.location.reload()" >确定</button>
            </div>
        </div>
    </div>
</div>



<!--加载效果-->
<div class="sk-circle" id="load" style="display:;">
    <div class="sk-circle1 sk-child"></div>
    <div class="sk-circle2 sk-child"></div>
    <div class="sk-circle3 sk-child"></div>
    <div class="sk-circle4 sk-child"></div>
    <div class="sk-circle5 sk-child"></div>
    <div class="sk-circle6 sk-child"></div>
    <div class="sk-circle7 sk-child"></div>
    <div class="sk-circle8 sk-child"></div>
    <div class="sk-circle9 sk-child"></div>
    <div class="sk-circle10 sk-child"></div>
    <div class="sk-circle11 sk-child"></div>
    <div class="sk-circle12 sk-child"></div>
</div>


    <!--&lt;!&ndash; Placed js at the end of the document so the pages load faster &ndash;&gt;-->


    <!--&lt;!&ndash;Dashboard Charts&ndash;&gt;-->
    <!--&lt;!&ndash;<script src="../../js/public/dashboard-chart-init.js"></script>&ndash;&gt;-->



</body>
<script src="/static/admin/js/public/jquery-1.10.2.min.js"></script>
<script src="/static/admin/js/public/plugs/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/admin/js/public.js"></script>
<script type="text/javascript" src="/static/admin/js/sys/admin/businessList.js"></script>
<script type="text/javascript">
    $(function(){
        //加载数据
        loadDatas();

    })
    function findAll(s){
        $("#load").css("display","block");

        $("#reset").click();

        loadDatas(s);
    }
</script>
</html>
